package com.bicon.botu.mall.order.processor.handler;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * payPrc
 *
 * @Author 李双喜
 * @Date 2018/1/9 16:08
 */
public interface PayRpc {
    /**
     * 转账支付
     *
     * @param fromUserId 用户id
     * @param payPwd     密码
     * @param payType    支付类型 0余额 1 支付宝 2微信
     * @param money      金额
     * @param toUserId   接收账户
     * @returnString fromUserId, double money, String toUserId, String payPwd, String remark, String payType, String code
     */

    @RequestMapping(value = "/V2.0.0/rpc/wallet/gratuity1", method = RequestMethod.POST)
    String gratuity(@RequestParam("module") String module, @RequestParam("business") String business, @RequestParam("fromUserId") String fromUserId, @RequestParam("money") Double money,
                    @RequestParam("toUserId") String toUserId, @RequestParam(value = "payPwd",required = false)String payPwd,
                    @RequestParam("remark") String remark, @RequestParam("payType") String payType,
                    @RequestParam("code") String code);

    /**
     * 校验支付信息并支付
     *
     * @param userId   用户id
     * @param password 用户密码
     * @param payType  支付类型 0:余额，1：支付宝，2：微信，3：银联
     * @param password 金额
     * @return
     */
    @RequestMapping(value = "checkPayInfo", method = RequestMethod.POST)
    String checkPayInfo(@RequestParam(value = "userId") String userId, @RequestParam(value = "password") String password,
                        @RequestParam(value = "payType") String payType, @RequestParam(value = "money") double money,
                        @RequestParam(value = "subject") String subject, @RequestParam(value = "subjectChild") String subjectChild,
                        @RequestParam(value = "appId") String appId, @RequestParam(value = "module") String module,
                        @RequestParam(value = "business") String business);


    /**
     * @param module
     * @param business
     * @param money
     * @param remark
     * @param code
     * @param orderNo
     * @param refundNo
     * @param refundReason
     * @return
     */
    @RequestMapping(value = "/V3.0.0/rpc/wallet/toRefund", method = RequestMethod.POST)
    public String toRefund(@RequestParam("module")  String module,
                           @RequestParam("business") String business,
                           @RequestParam("money") String money,
                           @RequestParam("remark") String remark,
                           @RequestParam("code") String code,
                           @RequestParam("orderNo") String orderNo,
                           @RequestParam("refundNo") String refundNo,
                           @RequestParam("refundReason") String refundReason);



}
